//
//  NSData+Extension.m
//  Mia
//
//  Created by Vill on 2024/1/22.
//

#import "NSData+Extension.h"

@implementation NSData (Extension)

+(id)dicToData:(NSDictionary *)jsonDic{
    NSError *error = nil;
    NSData *data = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:&error];
    if (error) {
        return error;
    } else {
        return data;
    }
}

@end
